package com.kc.business.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 用户创作
 */
@Data
@Table(name = "kc_user_creation")
public class BizUserCreation implements Serializable {
    /*创作表主键id*/
    @Id
    private String id;
    /*创作类别*/
    @NotNull(message = "所属类别不能为空")
    private String type;
    /*类别对应名称*/
    @Transient
    private String typeName = "";
    /*图片，多张图以","分割的不对外显示*/
    @NotNull(message = "图片不能为空")
    @JsonIgnore
    private String image = "";
    /*图片尺寸相关数据*/
    @JsonIgnore
    private String imgageAttr = "";
    /*图片列表，上面图片字符串拆分,此字段不写入数据表*/
    @Transient
    //@JsonProperty("image_list")
    private List<String> imageList = new ArrayList<>();
    /*标题*/
    @NotNull(message = "标题不能为空")
    private String title = "";
    /*简介*/
    @NotNull(message = "简介不能为空")
    private String synopsis = "";
    /*视频地址*/
    private String videoUrl = "";
    /*视频时长*/
    private Integer videoTime = 0;
    /*提交时间*/
    @JsonIgnore
    private Date createTime = new Date();
    /*状态:0待审核，1已审核，2已拒绝*/
    private String status = "";
    @Transient
    private String statusName = "";
    /*创作时间*/
    private String creationTime = "";
    /*创作地点*/
    private String creationAddress = "";
    /*创作者昵称*/
    @Transient
    private String nickname = "";
    /*创作者id*/
    private Integer userId = 0;
    /*主体id,景区景点id*/
    @NotNull(message = "景区id不能为空")
    @Min(value = 0,message = "景区id错误")
    private Integer themeId = 0;
    /*备注，拒绝原因*/
    private String refuseInfo = "";
    /*景区名称*/
    @Transient
    private String scenicId;
    /*景区名称*/
    @Transient
    private String scenicName = "";
    /*是否官方*/
    @Transient
    private Integer isOfficial;

    private Integer linkId = 0;
}
